

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   bn.java

package com.zelix;

import java.util.*;

// Referenced classes of package com.zelix:
//            tb, kd, in, sn, 
//            mx, wu, wn, um

public final class bn
    implements Comparable
{

    private int a;
    private int b;
    private Vector c;
    private Vector d;
    private bn e;
    private ArrayList f;
    private bn g;
    private ArrayList h;
    private ArrayList i;
    private String j;
    private int k;
    private static String z[];

    public bn()
    {
        k = -1;
    }

    void a(bn bn1)
    {
        if(i == null)
            i = new ArrayList();
        i.add(bn1);
    }

    void b(bn bn1)
    {
        if(f == null)
            f = new ArrayList();
        f.add(bn1);
    }

    void c(bn bn1)
    {
        if(d == null)
            d = new Vector();
        if(!d.contains(bn1))
            d.addElement(bn1);
    }

    void d(bn bn1)
    {
        if(c == null)
            c = new Vector();
        if(!c.contains(bn1))
            c.addElement(bn1);
    }

    void e(bn bn1)
    {
        if(h == null)
            h = new ArrayList();
        h.add(bn1);
    }

    public void a()
    {
        d = null;
        c = null;
        e = null;
        g = null;
        i = null;
    }

    public int compareTo(Object obj)
    {
        bn bn1 = (bn)obj;
        if(a < bn1.a)
            return -1;
        return a != bn1.a ? 1 : 0;
    }

    void a(HashMap hashmap, Hashtable hashtable, Hashtable hashtable1)
    {
        boolean flag = wn.C;
        if(c == null) goto _L2; else goto _L1
_L1:
        int i1;
        int j1;
        i1 = c.size();
        j1 = 0;
        if(!flag) goto _L4; else goto _L3
_L3:
        bn bn1 = (bn)c.elementAt(j1);
        Hashtable hashtable3 = a(hashmap, hashtable, hashtable1, bn1, false);
        if(hashtable3 != null)
            bn1.a(hashmap, hashtable3, hashtable1);
        j1++;
_L4:
        if(j1 < i1) goto _L3; else goto _L2
_L2:
        if(e != null)
        {
            Hashtable hashtable2 = a(hashmap, hashtable, hashtable1, e, false);
            if(hashtable2 != null)
                e.a(hashmap, hashtable2, hashtable1);
        }
        return;
    }

    private Hashtable a(HashMap hashmap, Hashtable hashtable, Hashtable hashtable1, bn bn1, boolean flag)
    {
label0:
        {
label1:
            {
                boolean flag1 = wn.C;
                if(!hashtable1.containsKey(bn1))
                    break label0;
                if(hashtable.containsKey(bn1))
                {
                    if(!hashmap.containsKey(bn1))
                    {
                        in in1 = new in(bn1, this);
                        hashmap.put(bn1, in1);
                        if(!flag1)
                            break label1;
                    }
                    in in2 = (in)hashmap.get(bn1);
                    in2.a(this);
                    if(!flag1)
                        break label1;
                }
                if(!flag)
                    bn1.c(this);
            }
            return null;
        }
        hashtable1.put(bn1, bn1);
        if(!flag)
            bn1.c(this);
        Hashtable hashtable2 = (Hashtable)hashtable.clone();
        hashtable2.put(bn1, bn1);
        return hashtable2;
    }

    Enumeration c()
    {
        if(i != null)
            return Collections.enumeration(i);
        else
            return mx.a();
    }

    public int d()
    {
        return b;
    }

    public bn e()
    {
        if(c != null && c.size() == 2)
            return (bn)c.elementAt(1);
        else
            return null;
    }

    List f()
    {
        return Collections.unmodifiableList(f);
    }

    Vector g()
    {
        return d;
    }

    public int a(sn sn1, sn asn[], Hashtable hashtable, bn bn1, bn bn2, bn bn3, Vector vector, 
            um um, wu wu1)
        throws tb
    {
        int i1;
        int j1;
        boolean flag;
label0:
        {
            flag = wn.C;
            if(this == bn3)
                return -1;
            if(this == bn1 && ((kd)vector.elementAt(a)).i())
            {
                i1 = a + 1;
                if(!flag)
                    break label0;
            }
            i1 = a;
        }
        j1 = b - 1;
        if(!flag) goto _L2; else goto _L1
_L1:
        if(asn[j1].a() && sn1.b(um, asn[j1]))
        {
            wu1.a(this);
            return j1;
        }
        j1--;
_L2:
        if(j1 >= i1) goto _L1; else goto _L3
_L3:
        if(this == bn2)
            break MISSING_BLOCK_LABEL_278;
        if(c == null) goto _L5; else goto _L4
_L4:
        int k1;
        int i2;
        k1 = c.size();
        i2 = 0;
        if(!flag) goto _L7; else goto _L6
_L6:
        bn bn4 = (bn)c.elementAt(i2);
        if(!hashtable.containsKey(bn4))
        {
            hashtable.put(bn4, bn4);
            int j2 = bn4.a(sn1, asn, hashtable, bn1, bn2, bn3, vector, um, wu1);
            if(j2 != -1)
                return j2;
        }
        i2++;
_L7:
        if(i2 < k1) goto _L6; else goto _L5
_L5:
        if(e != null && !hashtable.containsKey(e))
        {
            hashtable.put(e, e);
            int l1 = e.a(sn1, asn, hashtable, bn1, bn2, bn3, vector, um, wu1);
            if(l1 != -1)
                return l1;
        }
        return -1;
    }

    public String h()
    {
        return j;
    }

    public bn i()
    {
        if(c != null && c.size() > 0)
            return (bn)c.elementAt(0);
        else
            return null;
    }

    public Vector j()
    {
        return c;
    }

    ArrayList k()
    {
        return h;
    }

    bn l()
    {
        return e;
    }

    public int m()
    {
        return a;
    }

    public bn a()
    {
        return g;
    }

    boolean n()
    {
        return h != null && h.size() > 0;
    }

    boolean o()
    {
        return j != null && j.startsWith(z[0]);
    }

    boolean p()
    {
        return j != null && j.equals(z[1]);
    }

    boolean a(bn bn1)
    {
        boolean flag = a(bn1, new HashMap());
        return flag;
    }

    private boolean a(bn bn1, HashMap hashmap)
    {
        boolean flag;
        int i1;
        int j1;
        boolean flag1;
        flag1 = wn.C;
        if(hashmap.put(bn1, bn1) != null)
            return false;
        if(bn1.d == null)
            return false;
        flag = false;
        i1 = bn1.d.size();
        j1 = 0;
        if(!flag1) goto _L2; else goto _L1
_L1:
        bn bn2 = (bn)bn1.d.get(j1);
        if(bn2 == this)
            return true;
        flag = a(bn2, hashmap);
        if(flag && !flag1)
            break; /* Loop/switch isn't completed */
        j1++;
_L2:
        if(j1 < i1) goto _L1; else goto _L3
_L3:
        return flag;
    }

    Enumeration q()
    {
        if(c != null)
            return c.elements();
        else
            return null;
    }

    public int r()
    {
        return (b - a) + 1;
    }

    void b(int i1)
    {
        b = i1;
    }

    void a(String s1)
    {
        j = s1;
    }

    void f(bn bn1)
    {
        e = bn1;
    }

    void c(int i1)
    {
        a = i1;
    }

    void g(bn bn1)
    {
        g = bn1;
    }

    int s()
    {
        int i1;
        int j1;
        int k1;
        int l1;
        boolean flag;
        flag = wn.C;
        if(k != -1)
            break MISSING_BLOCK_LABEL_96;
        i1 = r();
        if(d == null || (j1 = d.size()) <= 0)
            break MISSING_BLOCK_LABEL_91;
        k1 = 0x7fffffff;
        l1 = 0;
        if(!flag) goto _L2; else goto _L1
_L1:
        bn bn1 = (bn)d.elementAt(l1);
        int i2 = bn1.s();
        if(i2 < k1)
            k1 = i2;
        l1++;
_L2:
        if(l1 < j1) goto _L1; else goto _L3
_L3:
        i1 += k1;
        k = i1;
        return k;
    }

    public boolean h(bn bn1)
    {
        return c != null && c.size() == 2 && c.elementAt(0) == bn1;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x42;
                    break;
                case 1:
                    key = 65;
                    break;
                case 2:
                    key = 21;
                    break;
                case 3:
                    key =120;
                    break;
                case 4:
                    key = 2;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static
    {
        String as[] = new String[2];
        as[0] = z("! a\033j\f.q\035".toCharArray());
        as[1] = z("*$t\034g0".toCharArray());
        z = as;
    }
}